package com.cxb.demotest.config;

import com.cxb.demotest.interceptor.AntiBrushInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author Xbao
 * @version 1.0
 * @description
 * @date 2021/3/9 14:18
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
  @Autowired
  private AntiBrushInterceptor antiBrushInterceptor;

  @Override
  public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(antiBrushInterceptor);
  }
}
